package com.cn.goodsadmin.dao;


import com.cn.goodsadmin.po.GoodsInfoLog;
import com.cn.goodsadmin.po.UserFav;
import com.cn.goodsadmin.po.Userbuylog;

import java.util.List;

public interface IUserBuyLogDao {
    /**
     * 更新操作
     *
     * @param t
     */
    void update(Userbuylog t) throws Exception;

    /**
     * 删除操作
     *
     * @param t
     */
    void delete(Userbuylog t) throws Exception;

    /**
     * 增加操作
     *
     * @param t
     */
    void save(Userbuylog t) throws Exception;

    List<UserFav> findFavByOpenid(String openid, int size, int appid)throws Exception;

    List<Userbuylog>  findAllBuyLog(int day,String goodsId,int appid)throws Exception;

    List<GoodsInfoLog> findAllgoodsCountByTime(int day, int appid) throws Exception;

    List<Userbuylog>  findGoodsCardByTime(int day,String goodsid,int appid)throws Exception;

    /**
     * 买的总次数
     * @param openid
     * @param appid
     * @return
     * @throws Exception
     */
    long findUserAllBuyCount(String openid,int appid) throws Exception;

}
